import { defineStore } from "pinia"

const userOneStore = defineStore("one", {
  state: () => {
    return {
      active: "1",
      active1: "1",
      active2: "1",
      active3: "1",
      oneOnList: [],
      twoOnList: [],
      shijian: 9
    }
  },
  actions: {
    updateActive(e) {
      this.active = e
    },
    updateActive1(e) {
      this.active1 = e
    },
    updateActive2(e) {
      this.active2 = e
    },
    updateShijian() {
      this.shijian++
    },
    updateActive3(e) {
      this.active3 = e
    },
    axiosOneOnList() {
      this.oneOnList = [
        {
          name: "小明",
          age: 3
        },
        {
          name: "小王",
          age: 2
        },
        {
          name: "小李",
          age: 1
        },
        {
          name: "小黑",
          age: 100
        }
      ]
    },
    axiostwoOnList() {
      this.twoOnList = [
        {
          name: "小明",
          age: 80
        },
        {
          name: "小王",
          age: 1
        },
        {
          name: "小李",
          age: 200
        },
        {
          name: "小黑",
          age: 2
        }
      ]
    }
  }
})

export default userOneStore
